USE [iicdb]
GO

/****** Object:  View [dbo].[vReportExamHistory]    Script Date: 12/09/2011 21:26:57 ******/
IF  EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[vReportExamHistory]'))
DROP VIEW [dbo].[vReportExamHistory]
GO

USE [iicdb]
GO

/****** Object:  View [dbo].[vReportExamHistory]    Script Date: 12/09/2011 21:26:57 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE VIEW [dbo].[vReportExamHistory] AS
	SELECT	CandidateCode, Grade, LessonName, RTRIM(FirstName) + ' ' + RTRIM(LastName) as 'FullName', IdNumber, PeriodName, PeriodCode
	FROM	ClassMember, Class, Lesson, Student, Period
	WHERE	ClassMember.ClassId = Class.ClassId  and Class.LessonId = Lesson.LessonId and ClassMember.StudentId = Student.StudentId and Class.PeriodId = Period.PeriodId

GO




